import h from './mysnabbdom/h.js';
import path from './mysnabbdom/patch.js';

const mynode1 = h('ul', {}, [
    h('li', {key:'A'}, 'A'),
    h('li', {key:'B'}, 'B'),
    h('li', {key:'Q'}, 'Q'),
    h('li', {key:'C'}, 'C'),
    h('li', {key:'D'}, 'D'),
   
   
   
]);
const mynode2 = h('ul', {}, [
    h('li', {key:'D'}, 'D'),
    h('li', {key:'C'}, 'C123'),
    h('li', {key:'B'}, 'Basdsd'),
    h('li', {key:'A'}, 'A121'),
   
 
    ]);

//让虚拟节点上树
const container = document.getElementById("container");
const btn = document.getElementById("btn");
path(container,mynode1)
// console.log(mynode1);
btn.onclick=function(){
    path(mynode1,mynode2)
}